package com.cenwangkeji.resident.model.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @松 on 2019/12/18 13:36
 */
public class MessageHistoryBean implements Parcelable {


    /**
     * code : 0
     * data : {"rows":[{"id":12,"jmId":176,"msg":"重要通知：您需要在2019-12-19 00:00:00来我院进行2型糖尿病患者健康随访记录项目检查！","pushDate":"2019-12-19 12:12:10","sfId":226,"status":1,"ysId":36},{"id":11,"jmId":176,"msg":"重要通知：您需要在2019-12-19 00:00:00来我院进行高血压患者随访记录项目检查！","pushDate":"2019-12-19 12:12:32","sfId":"","status":0,"ysId":36},{"id":10,"jmId":176,"msg":"重要通知：您需要在2019-12-19 00:00:00来我院进行3到6岁儿童健康检查记录项目检查！","pushDate":"2019-12-19 12:12:29","sfId":"","status":0,"ysId":36}],"total":3}
     * msg : 操作成功
     */

    private int code;
    private DataBean data;
    private String msg;

    protected MessageHistoryBean(Parcel in) {
        code = in.readInt();
        msg = in.readString();
    }

    public static final Creator<MessageHistoryBean> CREATOR = new Creator<MessageHistoryBean>() {
        @Override
        public MessageHistoryBean createFromParcel(Parcel in) {
            return new MessageHistoryBean(in);
        }

        @Override
        public MessageHistoryBean[] newArray(int size) {
            return new MessageHistoryBean[size];
        }
    };

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(code);
        dest.writeString(msg);
    }

    public static class DataBean {
        /**
         * rows : [{"id":12,"jmId":176,"msg":"重要通知：您需要在2019-12-19 00:00:00来我院进行2型糖尿病患者健康随访记录项目检查！","pushDate":"2019-12-19 12:12:10","sfId":226,"status":1,"ysId":36},{"id":11,"jmId":176,"msg":"重要通知：您需要在2019-12-19 00:00:00来我院进行高血压患者随访记录项目检查！","pushDate":"2019-12-19 12:12:32","sfId":"","status":0,"ysId":36},{"id":10,"jmId":176,"msg":"重要通知：您需要在2019-12-19 00:00:00来我院进行3到6岁儿童健康检查记录项目检查！","pushDate":"2019-12-19 12:12:29","sfId":"","status":0,"ysId":36}]
         * total : 3
         */

        private int total;
        private List<RowsBean> rows;

        public int getTotal() {
            return total;
        }

        public void setTotal(int total) {
            this.total = total;
        }

        public List<RowsBean> getRows() {
            return rows;
        }

        public void setRows(List<RowsBean> rows) {
            this.rows = rows;
        }

        public static class RowsBean implements Parcelable{
            /**
             * id : 12
             * jmId : 176
             * msg : 重要通知：您需要在2019-12-19 00:00:00来我院进行2型糖尿病患者健康随访记录项目检查！
             * pushDate : 2019-12-19 12:12:10
             * sfId : 226
             * status : 1
             * ysId : 36
             */

            private int id;
            private int jmId;
            private String msg;
            private String pushDate;
            private int sfId;
            private int status;
            private int ysId;

            protected RowsBean(Parcel in) {
                id = in.readInt();
                jmId = in.readInt();
                msg = in.readString();
                pushDate = in.readString();
                sfId = in.readInt();
                status = in.readInt();
                ysId = in.readInt();
            }

            public static final Creator<RowsBean> CREATOR = new Creator<RowsBean>() {
                @Override
                public RowsBean createFromParcel(Parcel in) {
                    return new RowsBean(in);
                }

                @Override
                public RowsBean[] newArray(int size) {
                    return new RowsBean[size];
                }
            };

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public int getJmId() {
                return jmId;
            }

            public void setJmId(int jmId) {
                this.jmId = jmId;
            }

            public String getMsg() {
                return msg;
            }

            public void setMsg(String msg) {
                this.msg = msg;
            }

            public String getPushDate() {
                return pushDate;
            }

            public void setPushDate(String pushDate) {
                this.pushDate = pushDate;
            }

            public int getSfId() {
                return sfId;
            }

            public void setSfId(int sfId) {
                this.sfId = sfId;
            }

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public int getYsId() {
                return ysId;
            }

            public void setYsId(int ysId) {
                this.ysId = ysId;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeInt(id);
                dest.writeInt(jmId);
                dest.writeString(msg);
                dest.writeString(pushDate);
                dest.writeInt(sfId);
                dest.writeInt(status);
                dest.writeInt(ysId);
            }
        }
    }
}
